//
//  WWTestController.m
//  Shopping
//
//  Created by 张湾湾 on 16/8/18.
//  Copyright © 2016年 张湾湾. All rights reserved.
//

#import "WWTestController.h"
#import "WWNetworkTools.h"

@interface WWTestController ()

@end

@implementation WWTestController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self surpmarket];
}

/**首页*/
- (void)home{
 
      [[WWNetworkTools sharedTools] getHomeWithSuccess:^(id response) {
          NSLog(@"%@",response);
      } failure:^(NSError *error) {
          NSLog(@"%@",error);
      }];
    

}

/**新鲜热卖*/
- (void)sell{
    [[WWNetworkTools sharedTools] fruitSellWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
}

/**程序启动广告*/
- (void)advert{
    [[WWNetworkTools sharedTools] advertWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
    
}
/**闪电超市*/
- (void)surpmarket{
    [[WWNetworkTools sharedTools] surpmarketWithSuccess:^(NSDictionary *response)  {
        NSLog(@"%@",response[@"data"][@"categories"]);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];

}

/**搜索关键词*/
- (void)search{
    [[WWNetworkTools sharedTools] searchResultWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
    
}

/**搜索返回的结果*/
- (void)searchResult{
    [[WWNetworkTools sharedTools] searchResultWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
  
}
/**我的*/
- (void)me{
    [[WWNetworkTools sharedTools] meWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
}
/**优惠券*/
- (void)myCoupon{
    [[WWNetworkTools sharedTools] myCouponWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
    
}
/**系统消息*/
- (void)systemMessage{
    [[WWNetworkTools sharedTools] systemMessageWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
    
}

/**我的信息*/
- (void)userMessage{
    [[WWNetworkTools sharedTools] userMessageWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
}

/**收货地址*/

- (void)mayAdress{
    [[WWNetworkTools sharedTools]userMessageWithSuccess:^(NSString *response) {
        NSLog(@"%@",response);
    } failure:^(NSError *error) {
        NSLog(@"%@",error);
    }];
}



@end
